1. Home
  2. Python
  3. Python Examples
  4. Python – Generate Random Number

Python – Generate Random Number

Python Program to Generate A Random Number

Q. Write a Python program to generate a random number. A random number can be any number between given two numbers.

Use randint() function defined under the random python module. It accept two parameters of start and end number.

Execute above script and it will return a random number between given numbers.

Output:

33

Output value may change with each run.

Tags